#include<stdio.h>
#include<string.h>

int main()
{
	int i,n;
	char s[100]="",p;
	gets(s);
	n=strlen(s);
	for(i=0; s[i]!='\0'; i++)
	{
         if(s[i]>='a'&&s[i]<='z')
	         s[i]=(s[i]+23-'a')%26+'a';
	     if(s[i]>='A'&&s[i]<='Z')
		     s[i]=(s[i]+23-'A')%26+'A';
	}
	for(i=0;i<n;i++)
	{
		if(s[i]>='a'&&s[i]<='z')
	         s[i]-=32;
	    else if(s[i]>='A'&&s[i]<='Z')
		     s[i]+=32;
	}
	for(i=0;i<n/2;i++)
	{
		p=s[i];
		s[i]=s[n-i-1];
		s[n-i-1]=p;
	}
	puts(s);
	return 0;
}
